/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package formulagraph;

import java.text.DecimalFormat;

/**
 *
 * @author soler4888
 */
public class Punto {
    
    private Double x;
    private Double y;
    private static final DecimalFormat format = new DecimalFormat("######0.00");
    
    public Punto(Double x, Double y) {
        this.x = x;
        this.y = y;
    }

    public Double getX() {
        return x;
    }

    public void setX(Double x) {
        this.x = x;
    }

    public Double getY() {
        return y;
    }

    public void setY(Double y) {
        this.y = y;
    }

    public String dibujar() {
        return format.format(x).replace(",", ".") + "," + format.format(-y).replace(",", ".");
    } 
    
    @Override
    public String toString() {
        return "(" + x.toString() + ", " + y.toString() + ")";
    }
    
}
